package com.leonzhangxf.ioc.transaction;

/**
 * @author leonzhangxf
 */
public interface TransactionManager {

    /**
     * start transaction.
     *
     * @throws Exception throw when start transaction failed.
     */
    void beginTransaction() throws Exception;

    /**
     * commit current trasaction.
     *
     * @throws Exception throw when commit transaction failed.
     */
    void commit() throws Exception;

    /**
     * rollback current transaction.
     *
     * @throws Exception throws when rollback transaction failed.
     */
    void rollback() throws Exception;
}
